package com.milling.business.service.impl;

import java.util.List;
import com.milling.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.milling.business.mapper.WmsBoxHoleMapper;
import com.milling.business.domain.WmsBoxHole;
import com.milling.business.service.IWmsBoxHoleService;

/**
 * 盒子孔位信息Service业务层处理
 *
 * @author X
 * @date 2025-09-12
 */
@Service
public class WmsBoxHoleServiceImpl implements IWmsBoxHoleService
{
    @Autowired
    private WmsBoxHoleMapper wmsBoxHoleMapper;

    /**
     * 查询盒子孔位信息
     *
     * @param id 盒子孔位信息主键
     * @return 盒子孔位信息
     */
    @Override
    public WmsBoxHole selectWmsBoxHoleById(Long id)
    {
        return wmsBoxHoleMapper.selectWmsBoxHoleById(id);
    }

    /**
     * 查询盒子孔位信息列表
     *
     * @param wmsBoxHole 盒子孔位信息
     * @return 盒子孔位信息
     */
    @Override
    public List<WmsBoxHole> selectWmsBoxHoleList(WmsBoxHole wmsBoxHole)
    {
        return wmsBoxHoleMapper.selectWmsBoxHoleList(wmsBoxHole);
    }

    /**
     * 新增盒子孔位信息
     *
     * @param wmsBoxHole 盒子孔位信息
     * @return 结果
     */
    @Override
    public int insertWmsBoxHole(WmsBoxHole wmsBoxHole)
    {
        wmsBoxHole.setCreateTime(DateUtils.getNowDate());
        return wmsBoxHoleMapper.insertWmsBoxHole(wmsBoxHole);
    }

    /**
     * 修改盒子孔位信息
     *
     * @param wmsBoxHole 盒子孔位信息
     * @return 结果
     */
    @Override
    public int updateWmsBoxHole(WmsBoxHole wmsBoxHole)
    {
        wmsBoxHole.setUpdateTime(DateUtils.getNowDate());
        return wmsBoxHoleMapper.updateWmsBoxHole(wmsBoxHole);
    }

    /**
     * 批量删除盒子孔位信息
     *
     * @param ids 需要删除的盒子孔位信息主键
     * @return 结果
     */
    @Override
    public int deleteWmsBoxHoleByIds(Long[] ids)
    {
        return wmsBoxHoleMapper.deleteWmsBoxHoleByIds(ids);
    }

    /**
     * 删除盒子孔位信息信息
     *
     * @param id 盒子孔位信息主键
     * @return 结果
     */
    @Override
    public int deleteWmsBoxHoleById(Long id)
    {
        return wmsBoxHoleMapper.deleteWmsBoxHoleById(id);
    }
}
